import body from '@/components/body'
import childView from '@/components/appMain.vue'

const templateTree = resolve => {
  require(['@/views/interface/template/tree.vue'], resolve)
}; //
const templateList = resolve => {
  require(['@/views/interface/template/list.vue'], resolve)
}; //
const templateEdit = resolve => {
  require(['@/views/interface/template/edit.vue'], resolve)
}; //
const templateReName = resolve => {
  require(['@/views/interface/template/rename.vue'], resolve)
}; //
const templateSetting = resolve => {
  require(['@/views/interface/template/setting.vue'], resolve)
}; //
const resourceTree = resolve => {
  require(['@/views/interface/resource/tree.vue'], resolve)
}; //
const resourceList = resolve => {
  require(['@/views/interface/resource/list.vue'], resolve)
}; //
const resourceEdit = resolve => {
  require(['@/views/interface/resource/edit.vue'], resolve)
}; //
const resourceReName = resolve => {
  require(['@/views/interface/resource/rename.vue'], resolve)
}; //
const channelRouter = {
  path: '/channel', //栏目
  name: '栏目',
  component: body,
  iconCls: 'icon-appstoreo',
  redirect: '/channel/list',
  isParent: true,
  leaf: true, //只有一个节点
  children: [{
    path: '/channel/list',
    name: '栏目列表', //栏目列表
    component: resolve => {
      require(['@/views/channel/list.vue'], resolve)
    },
    hidden: true,
  }, {
    path: '/channel/save',
    name: '栏目添加', //栏目添加
    component: resolve => {
      require(['@/views/channel/add.vue'], resolve)
    },
    hidden: true,
  }, {
    path: '/channel/update',
    name: '栏目修改', //栏目修改
    component: resolve => {
      require(['@/views/channel/edit.vue'], resolve)
    },
    hidden: true,
  }, {
    path: '/channel/copy',
    name: '栏目复制', //栏目复制
    component: resolve => {
      require(['@/views/channel/copy.vue'], resolve)
    },
    hidden: true,
  }]
}
export default channelRouter
